{% extends 'styles/style_base.html' %}{% load i18n static thumbnail %}

{% block content %}
        <h3 class="style-title">{{ style_detail.name|title }}</h3>
        {% if user == style_detail.creator or user.is_staff %}
        <div class="row pull-right">
            <a class="btn btn-primary btn-mini" href="{% url 'style_update' style_detail.id %}" title="{% trans "Edit" %}"><i class="icon-pencil icon-white"></i></a>&nbsp
            <a class="btn btn-danger btn-mini" href="{% url 'style_delete' style_detail.id %}" title="{% trans "Delete" %}"><i class="icon-remove icon-white"></i></a>&nbsp
        </div>
        {% endif %}
        <hr />
        <div class="row">
            <div class="span4 mb-5">
                <div class="style-polaroid">
                    {% thumbnail style_detail.thumbnail_image "420x420" format="PNG" as im %}
                    <img class="" alt="{% trans "Style icon" %}" src="{{ im.url }}" width="{{ im.x }}" height="{{ im.y }}" />
                    {% endthumbnail %}

                </div>

            </div>
            <div class="span8">
                <dl class="dl-horizontal">
                    <dd></dd>
                    <dt>Name</dt>
                    <dd>{{ style_detail.name }}</dd>
                    <dt>Description</dt>
                    <dd>{{ style_detail.description }}</dd>
                    <dt>Uploaded Date</dt>
                    <dd>{{ style_detail.upload_date|date:"d F Y" }}</dd>
                    <dt>Approved Date</dt>
                    <dd>{{ style_detail.stylereview_set.last.review_date|date:"d F Y"}}</dd>
                    <dt>Creator</dt>
                    <dd>{{ style_detail.get_creator_name|title }}</dd>
                    <dt>Type</dt>
                    <dd>
                        {{ style_detail.style_type.name }}
                    </dd>

                    <dt>Style File</dt>
                    <dd>
                        <div>
                             <a class="btn btn-primary btn-mini" href="{% url 'style_download' style_detail.id %}" title="{% trans "Download" %}"><i class="icon-download-alt"></i> Download</a>
                        </div>
                    </dd>
                </dl>

            </div>
            <div class="span12 license">
              <div class="media" style="margin-top: 2rem">
                <a class="pull-left" href="#">
                  <img src="{% static 'images/cc-zero.svg' %}">
                </a>
                <div class="media-body">
                  <p>This Style is made available under the <a href="https://creativecommons.org/publicdomain/zero/1.0/" target="_blank">CC-0 license</a>.</p>
                </div>
              </div>
            </div>


        </div>
{% endblock %}